From 5d496aa7f3d05c7e449580c6f8d36154b66d2636 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 24 Nov 2010 01:11:26 +0100 Subject: [PATCH] GtkStyle: Do not warn if attach count == 0 This is going go happen more and more often now, as realize handlers start removing the gtk_widget_style_attach() calls. --- gtk/gtkstyle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 1d07ddf520..cdd12491c6 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -954,8 +954,10 @@ void gtk_style_detach (GtkStyle *style) { g_return_if_fail (GTK_IS_STYLE (style)); - g_return_if_fail (style->attach_count > 0); - + + if (style->attach_count == 0) + return; + style->attach_count -= 1; if (style->attach_count == 0) { -- 2.30.2